const DashBoard = () => import('@/views/DashBoard')
const Home = () => import('@/views/Home')
const Recommend = () => import('@/views/Recommend')
const Category = () => import('@/views/Category')
const Mine = () => import('@/views/Mine')
const History = () => import('@/components/content/mine/History')
const Collection = () => import('@/components/content/mine/Collection')
const MenuList = () => import('@/views/MenuList')
const MenuDetail = () => import('@/components/common/MenuDetail')
const Search = () => import('@/views/Search')
const Welcome = () => import('@/views/Welcome')

export const routes = [
  {
    path: '/',
    redirect: '/dashBoard',
  },
  {
    path: '/dashBoard',
    name: 'DashBoard',
    component: DashBoard,
    redirect: '/dashBoard/home',
    children: [
      {
        path: 'home',
        name: 'Home',
        component: Home
      },
      {
        path: 'recommend',
        name: 'Recommend',
        component: Recommend
      },
      {
        path: 'category',
        name: 'Category',
        component: Category
      },
      {
        path: 'mine',
        name: Mine,
        component: Mine,
        children: [
          {
            path: 'history',
            name: 'History',
            component: History
          },
          {
            path: 'collection',
            name: 'Collection',
            component: Collection
          }
        ]
      }
    ]
  },
  {
    path: '/menuList',
    name: 'MenuList',
    component: MenuList
  },
  {
    path: '/menuDetail',
    name: 'MenuDetail',
    component: MenuDetail
  },
  {
    path: '/search',
    name: 'Search',
    component: Search
  },
  {
    path: '/welcome',
    name: 'welcome',
    component: Welcome
  },

]